//---------------------------------------------------------------------------

#include "vcl_stl.h"
#pragma hdrstop

#include "h_base.h"
#include "h_xml.h"
using namespace h_base;
using namespace h_xml;

#include "h_global.h"

#include "h_stage.h"
#include "t_mainform.h"
#include "t_dummyform.h"

#include "t_batform.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TBatForm *BatForm;
//---------------------------------------------------------------------------
__fastcall TBatForm::TBatForm(TComponent* Owner)
   : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TBatForm::ButtonOkClick(TObject *Sender)
{
   Close();
}
//---------------------------------------------------------------------------

bool __fastcall TBatForm::Edit(void)
{
   MainForm->GetInfo(Info);
   UTF8String Cap;
   Cap.sprintf(UTF8String(DummyForm->PropertiesOf->Caption).c_str(), "batch");
   Caption = Cap;

   EditGroupName->Text = Info.GroupName;
   EditAuthor->Text = Info.Author;
   EditJobTrigger->Text = Info.JobTrigger;
   EditBatchTrigger->Text = Info.BatchTrigger;
   CheckBoxAutoSkip->Checked = Info.AutoSkip;
   EditAutoRerun->Text = Info.AutoRerun;
   SetStringToMemo(MemoDescription, Info.Description);
   SetStringToMemo(MemoIncludeFiles, Info.IncludeFiles);
   CheckBoxCheckBeforeTransfer->Checked = Info.CheckBeforeTransfer;
   CheckBoxAcrossDayEnd->Checked = Info.AcrossDayEnd;
   EditFadingPeriod->Text = Info.FadingPeriod;
   EditSectionList->Text = Info.SectionList;
   EditTrafficControl->Text = Info.TrafficControl;
   EditPartitionDither->Text = Info.PartitionDither;
   EditBanner->Text = Info.Banner;
   ComboBoxBannerPosition->ItemIndex = Info.BannerPosition;
   EditBannerFontName->Text = Info.BannerFontName;
   PageControl1->ActivePageIndex = 0;
   ShowModal();
   return true;
}

